﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EventbriteService.Model
{
    public enum Privacy
    {
        Private,
        Public
    }

    public enum Status
    {
        Draft,
        Live,
        Started,
        Ended,
        Canceled,
        Completed,
        Unsaved,
        Deleted
    }

    public class Event
    {
        public Event()
        {
            this.Venue = new Venue();
            this.Organizer = new Organizer();
            this.Category = new Category();
            this.SubCategory = new SubCategory();
            this.Format = new Format();
            this.Name = new MultipartText();
            this.Description = new MultipartText();
            this.Start = new DateTimeTZ();
            this.End = new DateTimeTZ();
            this.Privacy = new Privacy();
            this.Logo = new Logo();
            this.TicketClasses = new List<Ticket>();
       }
        public long? Id  {get; set;}
        public MultipartText Name  {get; set;}
        public MultipartText Description  {get; set;}
        public DateTimeTZ Start  {get; set;}
        public DateTimeTZ End  {get; set;}
        public string Currency  {get; set;}
        public DateTime? Created  {get; set;}
        public DateTime? Changed  {get; set;}
        public Privacy Privacy  {get; set;}
        public int? Capacity  {get; set;}
        public string Url  {get; set;}
        public string LogoUrl  {get; set;}
        public string LogoId  {get; set;}
        public long? OrganizerId { get; set; }
        public long? VenueId { get; set; }
        public int? CategoryId { get; set; }
        public int? SubCategoryId { get; set; }
        public int? FormatId { get; set; }

        public bool? OnlineEvent { get; set; }
       
        public string Status  {get; set;}
        public Venue Venue  {get; set;}
        public Category Category { get; private set; }
        public SubCategory SubCategory { get; private set; }
        public Format Format { get; private set; }
        public Organizer Organizer { get; set; }
        public Logo Logo { get; private set; }
        public List<Ticket> TicketClasses  {get; private set;}
        public Summary Pagination { get; set; }

        public EventSearchRequest Request { get; set; }

       
    }

    public class Summary
    {
        public long? ObjectCount  {get; set;}
        public long? PageNumber  {get; set;}
        public int? PageSize  {get; set;}
        public int? PageCount  {get; set;}

    }

    public class EventSearchRequest
    {
        public string Keywords  {get; set;}
       // public string Name { get; set; }
        public Categories Categories  {get; set;}
        public Formats Formats { get; set; }
        public string Address  {get; set;}
        public string City  {get; set;}
        public string Region  {get; set;}
       // public string PostalCode  {get; set;}
        public string Country  {get; set;}
        public string Within  {get; set;}
      
        public string Latitude  {get; set;}
        public string Longitude  {get; set;}
        public DateTime? Date  {get; set;}
        public DateKeywords DateKeyword  {get; set;}
       
        public DateTime? DateCreated  {get; set;}
        public DateKeywords DateCreatedKeyword  {get; set;}
        public DateTime? DateModified  {get; set;}
        public DateKeywords DateModifiedKeyword  {get; set;}
        public long Organizer  {get; set;}
        public long User { get; set; }
        public long SinceId  {get; set;}
        public int Page { get; set; }
       
    }

    [Flags]
    public enum Formats
    {
        Conference= 1 << 1,
        Seminar= 1 << 2,
        Expo = 1 << 3,
        Convention =1 << 4,
        Festival = 1 << 5,
        Performance = 1 << 6,
        Screening = 1 << 7,
        Gala = 1 << 8,
        Class = 1 << 9,
        Networking = 1 << 10,
        Party = 1 << 11,
        Rally = 1 << 12,
        Tournament = 1 << 13,
        Game = 1 << 14,
        Race = 1 << 15,
        Tour = 1 << 16,
        Attraction = 1 << 17,
        Retreat = 1 << 18,
        Appearance = 1 << 19,
        Other = 1 << 20
    }

    [Flags]
    public enum Categories
    {
        Business = 1 << 1,
        ScienceTech = 1 << 2,
        Music = 1 << 3,
        FilmMedia = 1 << 4,
        Arts = 1 << 5,
        FashionBeauty = 1 << 6,
        HealthWellness = 1 << 7,
        SportsFitness = 1 << 8,
        TravelOutdoor = 1 << 9,
        FoodDrink = 1 << 10,
        CharityCauses = 1 << 11,
        Government = 1 << 12,
        Community = 1 << 13,
        ReligionSpirituality = 1 << 14,
        FamilyEducation = 1 << 15,
        SeasonalHoliday = 1 << 16,
        HomeLifestyle = 1 << 17,
        AutoBoatAir = 1 << 18,
        Hobbies = 1 << 19,
        Other = 1 << 20
    }

    public enum DateKeywords
    {
        Today,
        Tomorrow,
        ThisWeek,
        ThisWeekend,
        NextWeek,
        ThisMonth
    }
   
   
}
